Skip to content

fix(kubescape): keep foreground storage writes schedulable - #3448

Merged
devantler merged 1 commit into
mainfrom
codex/kubescape-storage-foreground-writes-3275
Aug 29, 2026
Merged

devantler merged 1 commit into
mainfrom
codex/kubescape-storage-foreground-writes-3275

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Root cause

Production acceptance of #3444 proved the immediate-transaction fix is incomplete. Controlled scan ad9b70ed-37d6-415f-8bc3-062351dff300 saved locally, then timed out persisting while WorkloadConfigurationScan remained stale. BEGIN IMMEDIATE removes the two-worker lock-promotion deadlock, but it reserves SQLite's only writer before minutes of container-profile reads and computation. Two background consolidation workers can then hand the writer lock between themselves and starve foreground REST persistence past its deadline.

Fix

  • Restore the pinned source's deferred profile transaction so the read-heavy phase does not reserve SQLite's writer.
  • Bound background consolidation to one worker, eliminating the two-background-writer promotion race.
  • Keep the independently proven 60-second busy timeout.
  • Publish a new immutable sqlite-contention.3 compatibility image from protected main only.

Proof

  • RED: the deployed design failed both new regressions: default maintenance workers were 2, and a foreground writer received SQLITE_BUSY while the background transaction was only reading.
  • GREEN: both regressions pass with one deferred maintenance worker.
  • Full go test ./pkg/registry/file passes on exact upstream source b35788b68337134fc2514574cde1ba7f1225fd43 after applying the packaged patch.
  • Focused go test -race passes.
  • Patch apply/check, gofmt, ShellCheck, actionlint, both Kubescape platform contracts, and git diff --check pass.

This PR publishes the corrected image. It deliberately does not change the live HelmRelease; deployment and a second controlled scan follow only after the protected main image is signed and verified.

Refs #3275.

@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

✅⚠️MegaLinter analysis: Success with warnings

⚠️ BASH / bash-exec - 8 errors
Results of bash-exec linter (version 5.3.9)
See documentation on https://megalinter.io/10.0.0/descriptors/bash_bash_exec/
-----------------------------------------------

✅ [SUCCESS] .github/scripts/setup-ksail.sh
✅ [SUCCESS] .github/scripts/setup-talosctl.sh
✅ [SUCCESS] scripts/check-megalinter-version-drift.sh
✅ [SUCCESS] scripts/dr-rebuild-supersession-guard.sh
❌ [ERROR] scripts/ghcr-auth-lib.sh
    Error: File:[scripts/ghcr-auth-lib.sh] is not executable

✅ [SUCCESS] scripts/guard-checkov-skip-reasons.sh
✅ [SUCCESS] scripts/guard-cilium-homogeneous-device-rollout.sh
✅ [SUCCESS] scripts/guard-gitrepository-commit-pin.sh
✅ [SUCCESS] scripts/guard-limitrange-premise.sh
✅ [SUCCESS] scripts/guard-render-remote-resources.sh
✅ [SUCCESS] scripts/guard-shared-publish-workflow-pin.sh
✅ [SUCCESS] scripts/inventory-first-party-image-signatures.sh
✅ [SUCCESS] scripts/megalinter-scan-counts.sh
✅ [SUCCESS] scripts/normalize-sarif-paths.sh
❌ [ERROR] scripts/refresh-flux-ghcr-auth-safety.sh
    Error: File:[scripts/refresh-flux-ghcr-auth-safety.sh] is not executable

✅ [SUCCESS] scripts/refresh-flux-ghcr-auth.sh
✅ [SUCCESS] scripts/registry-auth-lib.sh
✅ [SUCCESS] scripts/report-cilium-rollout-gate-suppression.sh
✅ [SUCCESS] scripts/report-publish-workflow-signing-revisions.sh
✅ [SUCCESS] scripts/run-ksail-prod-with-pull-auth.sh
✅ [SUCCESS] scripts/scan-rgd-templates.sh
✅ [SUCCESS] scripts/summarize-sarif-findings.sh
✅ [SUCCESS] scripts/tests/test-actual-budget-auth-route.sh
✅ [SUCCESS] scripts/tests/test-check-megalinter-version-drift.sh
✅ [SUCCESS] scripts/tests/test-cilium-bandwidth-manager-component.sh
✅ [SUCCESS] scripts/tests/test-cilium-homogeneous-devices-activation.sh
✅ [SUCCESS] scripts/tests/test-cilium-homogeneous-devices-autoscaler-gate.sh
✅ [SUCCESS] scripts/tests/test-cilium-homogeneous-devices-flux-wait.sh
❌ [ERROR] scripts/tests/test-cilium-metadata-egress-policy.sh
    Error: File:[scripts/tests/test-cilium-metadata-egress-policy.sh] is not executable

✅ [SUCCESS] scripts/tests/test-cilium-mutual-auth-policy-regressions.sh
✅ [SUCCESS] scripts/tests/test-cilium-mutual-auth-policy.sh
✅ [SUCCESS] scripts/tests/test-cilium-rollout-gate-suppression-signal.sh
✅ [SUCCESS] scripts/tests/test-cnpg-degraded-alert.sh
✅ [SUCCESS] scripts/tests/test-coroot-postgres-scrape-policy.sh
✅ [SUCCESS] scripts/tests/test-crossplane-egress-policy.sh
✅ [SUCCESS] scripts/tests/test-crossplane-sync-exporter.sh
✅ [SUCCESS] scripts/tests/test-dr-rebuild-supersession-guard.sh
✅ [SUCCESS] scripts/tests/test-github-config-role-activation-parity.sh
✅ [SUCCESS] scripts/tests/test-guard-checkov-skip-reasons.sh
✅ [SUCCESS] scripts/tests/test-guard-gitrepository-commit-pin.sh
❌ [ERROR] scripts/tests/test-guard-limitrange-premise.sh
    Error: File:[scripts/tests/test-guard-limitrange-premise.sh] is not executable

✅ [SUCCESS] scripts/tests/test-guard-render-remote-resources.sh
✅ [SUCCESS] scripts/tests/test-headlamp-oidc-version-gate.sh
❌ [ERROR] scripts/tests/test-headlamp-plugin-removal.sh
    Error: File:[scripts/tests/test-headlamp-plugin-removal.sh] is not executable

✅ [SUCCESS] scripts/tests/test-inventory-first-party-image-signatures.sh
✅ [SUCCESS] scripts/tests/test-kubescape-self-hosted-scan-persistence.sh
❌ [ERROR] scripts/tests/test-kubescape-storage-hotfix.sh
    Error: File:[scripts/tests/test-kubescape-storage-hotfix.sh] is not executable

✅ [SUCCESS] scripts/tests/test-kyverno-admission-vpa.sh
❌ [ERROR] scripts/tests/test-kyverno-umami-mutation-rbac.sh
    Error: File:[scripts/tests/test-kyverno-umami-mutation-rbac.sh] is not executable

✅ [SUCCESS] scripts/tests/test-megalinter-scan-counts-ignorefile.sh
✅ [SUCCESS] scripts/tests/test-minio-create-bucket-credentials.sh
✅ [SUCCESS] scripts/tests/test-normalize-sarif-paths.sh
✅ [SUCCESS] scripts/tests/test-openbao-oidc-role.sh
✅ [SUCCESS] scripts/tests/test-opencost-usage-scraper.sh
✅ [SUCCESS] scripts/tests/test-publish-workflow-signing-revisions.sh
✅ [SUCCESS] scripts/tests/test-pvc-prune-safety.sh
✅ [SUCCESS] scripts/tests/test-refresh-flux-ghcr-auth-safety.sh
✅ [SUCCESS] scripts/tests/test-registry-auth-lib.sh
✅ [SUCCESS] scripts/tests/test-restrict-homepage-service-groups.sh
✅ [SUCCESS] scripts/tests/test-restrict-tenant-network-policies.sh
✅ [SUCCESS] scripts/tests/test-restrict-tenant-secret-stores.sh
✅ [SUCCESS] scripts/tests/test-rgd-template-static-scan-wiring.sh
✅ [SUCCESS] scripts/tests/test-rgd-template-static-scan.sh
✅ [SUCCESS] scripts/tests/test-setup-ksail.sh
✅ [SUCCESS] scripts/tests/test-setup-talosctl.sh
✅ [SUCCESS] scripts/tests/test-shared-publish-workflow-pin-guard.sh
✅ [SUCCESS] scripts/tests/test-summarize-sarif-findings.sh
✅ [SUCCESS] scripts/tests/test-tenant-route-hostname-boundary.sh
✅ [SUCCESS] scripts/tests/test-trivyignore-configmap-content-boundary.sh
✅ [SUCCESS] scripts/tests/test-trivyignore-first-party-rbac-boundary.sh
✅ [SUCCESS] scripts/tests/test-trivyignore-vault-backup-identity-boundary.sh
✅ [SUCCESS] scripts/tests/test-trivyignore-vault-config-identity-boundary.sh
✅ [SUCCESS] scripts/tests/test-trivyignore-vendored-operator-boundary.sh
✅ [SUCCESS] scripts/tests/test-umami-provisioning-bootstrap.sh
✅ [SUCCESS] scripts/tests/test-use-prod-stable-api-endpoint.sh
✅ [SUCCESS] scripts/tests/test-validate-image-verifier-liveness.sh
❌ [ERROR] scripts/tests/test-vault-snapshot-group-readable.sh
    Error: File:[scripts/tests/test-vault-snapshot-group-readable.sh] is not executable

✅ [SUCCESS] scripts/tests/test-verify-published-evidence.sh
✅ [SUCCESS] scripts/update-vendored-operators.sh
✅ [SUCCESS] scripts/use-prod-stable-api-endpoint.sh
✅ [SUCCESS] scripts/validate-alert-coverage.sh
✅ [SUCCESS] scripts/validate-image-verifier-liveness.sh
✅ [SUCCESS] scripts/verify-published-evidence.sh
✅ [SUCCESS] scripts/wait-for-platform-flux-revision.sh
⚠️ SPELL / cspell - 4922 errors
"mkcase",
        "mkcfg",
        "mktemp",
        "mlock",
        "multidoc",
        "multidocclean",
        "multidocdirty",
        "multidoclike",
        "multidocwebapp",
        "mutatingpolicies",
        "mutatingwebhookconfigurations",
        "myapp",
        "mycorp",
        "najsk",
        "namespaceless",
        "neighbour",
        "neighbouring",
        "nenv",
        "nesac",
        "nestedlike",
        "netlink",
        "netpol",
        "netpols",
        "neutralises",
        "neutralising",
        "nextjs",
        "nftables",
        "nilnil",
        "nksail",
        "nlimitrange",
        "noapiversion",
        "nobuckets",
        "nocosign",
        "nodepod",
        "nodeport",
        "noentries",
        "noissue",
        "nolint",
        "nomatch",
        "nonroot",
        "nons",
        "nonslike",
        "nopass",
        "noprov",
        "normalisation",
        "normalise",
        "normalised",
        "normalises",
        "normalising",
        "noroot",
        "norules",
        "nosec",
        "notapair",
        "notrunning",
        "nouser",
        "nover",
        "nsxform",
        "nsxformlike",
        "nullglob",
        "objref",
        "ocirepository",
        "okcommented",
        "okdouble",
        "okempty",
        "okflowfirst",
        "okflowsecond",
        "okhash",
        "oklookalike",
        "okmention",
        "okmerge",
        "okmultidoc",
        "okprose",
        "oksingle",
        "oktooling",
        "oktrailing",
        "oktwoflow",
        "openbao",
        "openbao's",
        "opencontainers",
        "opencost",
        "openfeature",
        "openidconnectproviders",
        "oras",
        "organizationrulesets",
        "osxkeychain",
        "otherns",
        "overclaimed",
        "overprovisioning",
        "parallelised",
        "partialgroup",
        "partialrules",
        "pasteable",
        "permissioning",
        "persistentvolumeclaims",
        "persistentvolumes",
        "phaseless",
        "pinref",
        "pinsha",
        "pipefail",
        "plaintrailing",
        "plaintwospace",
        "policyreports",
        "portforward",
        "pousr",
        "preemptible",
        "prefilter",
        "prefiltering",
        "preservingly",
        "prioritisable",
        "prioritisation",
        "prioritised",
        "privesc",
        "providerconfigs",
        "providerwebapp",
        "pseudonymization",
        "pseudonymized",
        "pseudonymizes",
        "publishapp",
        "publishkubescapestorage",
        "publishprovider",
        "pushsecret",
        "pushsecrets",
        "qrbvrml",
        "queryfail",
        "quotedcomment",
        "quotednospacecomment",
        "randomises",
        "rawfile",
        "rdqwpktr",
        "readyz",
        "realcomment",
        "reassertions",
        "reattributed",
        "recognisable",
        "recognisably",
        "recognise",
        "recognised",
        "recognises",
        "recolour",
        "reconverges",
        "referencegrants",
        "refreshfluxghcrauth",
        "regenerable",
        "rego",
        "releaserc",
        "rematerialise",
        "rematerialised",
        "renderable",
        "replicaset",
        "repoint",
        "repointed",
        "repoints",
        "repositorypermissions",
        "repositoryrulesets",
        "rescan",
        "resizer",
        "restrictor",
        "retabbed",
        "retarget",
        "reversedalt",
        "rmem",
        "rolebindings",
        "rollouts",
        "rootfaulty",
        "rshared",
        "sanitised",
        "sanitiser",
        "sanitising",
        "sarif",
        "scheckov",
        "schedulability",
        "schedulable",
        "schemeless",
        "scopeable",
        "scopeless",
        "seccomp",
        "secretbox",
        "secretstore",
        "seedable",
        "selftest",
        "serialise",
        "serialised",
        "serialises",
        "serverside",
        "serviceaccount",
        "serviceaccounts",
        "setgid",
        "sgdisk",
        "shellcheck",
        "shfmt",
        "shopt",
        "shortsha",
        "siderolabs",
        "siderolink",
        "signedness",
        "sigstore",
        "skmde",
        "slurpfile",
        "sngle",
        "softwarecomposition",
        "sourceref",
        "specnull",
        "spiffe",
        "sprintf",
        "srole",
        "stakater",
        "staleroot",
        "startswith",
        "statefulset",
        "statefulsets",
        "statemanager",
        "stdlib",
        "stepif",
        "storageclass",
        "strenv",
        "subresource",
        "subresources",
        "subshell",
        "subtest",
        "summarised",
        "surfaceless",
        "syft",
        "synchronise",
        "synchronises",
        "syscall",
        "sysctls",
        "syste",
        "tagliteral",
        "tagonly",
        "talosconfig",
        "talosctl",
        "tanzu",
        "targetless",
        "tbranchprotections",
        "tcproutes",
        "tdefaultbranches",
        "teammemberships",
        "teamrepositories",
        "templatesyncignore",
        "thresholded",
        "tissuelabels",
        "tlsroutes",
        "tlsv",
        "tmpl",
        "toctou",
        "tonumber",
        "topenidconnectproviders",
        "toplevel",
        "torganizationrulesets",
        "toservices",
        "tostring",
        "tracepoints",
        "trafficroutes",
        "travelled",
        "treewide",
        "trepositorypermissions",
        "trepositoryrulesets",
        "trixie",
        "trueish",
        "trustd",
        "trustroot",
        "trustroots",
        "tteammemberships",
        "tteamrepositories",
        "ttrafficroutes",
        "tuftrustedroots",
        "ture",
        "udproutes",
        "uids",
        "umami",
        "umami's",
        "unablated",
        "unbaselined",
        "unclickable",
        "uncompilable",
        "unconfigured",
        "uncordon",
        "uncordoned",
        "uncordoning",
        "uncordons",
        "undecoded",
        "undercounts",
        "undispositioned",
        "unenforcing",
        "unevidenced",
        "unexcepted",
        "unfiled",
        "ungated",
        "ungenerated",
        "unifi",
        "uninspected",
        "uninvoked",
        "unioned",
        "unmarshalling",
        "unmarshals",
        "unmodelled",
        "unparseable",
        "unpremised",
        "unprovisioned",
        "unpublishing",
        "unrankable",
        "unrecognisable",
        "unrecognised",
        "unrelatedlike",
        "unrepresentable",
        "unreviewable",
        "unreviewed",
        "unroutable",
        "unrun",
        "unscanned",
        "unshippable",
        "unskipped",
        "unstubbed",
        "untrackable",
        "unvalidated",
        "unwaited",
        "unwired",
        "upbound",
        "updatekeys",
        "upjet",
        "upstreaming",
        "urlencode",
        "userinfo",
        "userns",
        "ushfn",
        "validatable",
        "validatealertcoverage",
        "validatingwebhookconfigurations",
        "vcunav",
        "vdual",
        "velero",
        "virt",
        "volumesnapshot",
        "vpas",
        "vulnerabilitymanifests",
        "vulnerabilitymanifestsummary",
        "vulns",
        "vxlan",
        "webapps",
        "wffc",
        "wgpolicyk",
        "wildcarded",
        "wildcarding",
        "wlid",
        "wmem",
        "workloadconfigurationscans",
        "workloadconfigurationscansummaries",
        "workloadconfigurationscansummary",
        "worktrees",
        "wrongns",
        "wrongowner",
        "xcheckov",
        "xform",
        "xoxb",
        "xpkg",
        "yannh",
        "yubikey",
        "yzwvjjmcyfnl",
        "zizmor"
    ]
}


You can also copy-paste megalinter-reports/.cspell.json at the root of your repository

(Truncated to last 8000 characters out of 903779)
⚠️ COPYPASTE / jscpd - 197 errors
d-template-static-scan-wiring.sh [112:31 - 118:29]
Clone found (bash)
 - scripts/tests/test-rgd-template-static-scan-wiring.sh [111:5 - 120:72] (10 lines, 106 tokens)
   scripts/tests/test-rgd-template-static-scan-wiring.sh [141:7 - 149:9]
Clone found (bash)
 - scripts/tests/test-rgd-template-static-scan-wiring.sh [148:28 - 154:29] (7 lines, 75 tokens)
   scripts/tests/test-rgd-template-static-scan-wiring.sh [177:50 - 183:29]
Clone found (bash)
 - scripts/tests/test-rgd-template-static-scan.sh [216:1 - 223:4] (8 lines, 53 tokens)
   scripts/tests/test-rgd-template-static-scan.sh [299:1 - 306:4]
Clone found (bash)
 - scripts/tests/test-rgd-template-static-scan.sh [231:1 - 242:6] (12 lines, 86 tokens)
   scripts/tests/test-rgd-template-static-scan.sh [265:1 - 276:6]
Clone found (bash)
 - scripts/tests/test-shared-publish-workflow-pin-guard.sh [58:20 - 64:2] (7 lines, 62 tokens)
   scripts/tests/test-shared-publish-workflow-pin-guard.sh [196:15 - 201:2]
Clone found (bash)
 - scripts/tests/test-trivyignore-vault-backup-identity-boundary.sh [113:1 - 134:2] (22 lines, 51 tokens)
   scripts/tests/test-trivyignore-vault-config-identity-boundary.sh [91:1 - 112:2]
Clone found (bash)
 - scripts/tests/test-trivyignore-vault-backup-identity-boundary.sh [147:153 - 154:36] (8 lines, 53 tokens)
   scripts/tests/test-trivyignore-vault-backup-identity-boundary.sh [178:153 - 185:36]
Clone found (bash)
 - scripts/tests/test-trivyignore-vault-backup-identity-boundary.sh [241:5 - 247:13] (7 lines, 57 tokens)
   scripts/tests/test-trivyignore-vault-config-identity-boundary.sh [168:3 - 174:11]
Clone found (bash)
 - scripts/tests/test-trivyignore-vault-backup-identity-boundary.sh [304:1 - 326:2] (23 lines, 108 tokens)
   scripts/tests/test-trivyignore-vault-config-identity-boundary.sh [255:1 - 277:2]
Clone found (python)
 - scripts/tests/test_validate_homepage_bookmarks.py [46:57 - 54:54] (9 lines, 58 tokens)
   scripts/tests/test_validate_homepage_bookmarks.py [100:53 - 109:54]
Clone found (go)
 - scripts/validate-dr-signing/main_test.go [1007:13 - 1015:2] (9 lines, 51 tokens)
   scripts/validate-dr-signing/main_test.go [1075:12 - 1083:2]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [659:50 - 664:24] (6 lines, 103 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1171:31 - 1176:24]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [691:14 - 697:4] (7 lines, 115 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1018:43 - 1024:4]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [717:13 - 726:7] (10 lines, 158 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1300:18 - 1309:7]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [726:1 - 731:8] (6 lines, 93 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1310:1 - 1315:8]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [803:5 - 808:2] (6 lines, 82 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [989:8 - 994:9]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [804:1 - 814:23] (11 lines, 220 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1081:60 - 1092:3]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [808:15 - 819:2] (12 lines, 185 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [909:17 - 920:2]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [855:15 - 866:12] (12 lines, 264 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1064:1 - 1077:3]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [918:2 - 924:19] (7 lines, 89 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1103:7 - 1109:19]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [918:2 - 924:33] (7 lines, 103 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1485:58 - 1491:33]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [918:2 - 924:4] (7 lines, 74 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1598:5 - 1604:4]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [1011:30 - 1016:8] (6 lines, 50 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1038:44 - 1043:8]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [1125:22 - 1131:2] (7 lines, 135 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1684:22 - 1690:2]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [1423:33 - 1431:11] (9 lines, 118 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1435:130 - 1443:11]
Clone found (go)
 - scripts/validate-eks-ci-role-policy/main_test.go [1630:47 - 1635:2] (6 lines, 166 tokens)
   scripts/validate-eks-ci-role-policy/main_test.go [1710:46 - 1715:2]
Clone found (go)
 - scripts/validate-flux-verify/instance_test.go [109:62 - 126:31] (18 lines, 57 tokens)
   scripts/validate-flux-verify/instance_test.go [161:57 - 178:31]
Clone found (go)
 - scripts/validate-flux-verify/instance_test.go [109:62 - 128:35] (20 lines, 62 tokens)
   scripts/validate-flux-verify/instance_test.go [198:55 - 217:26]
Clone found (go)
 - scripts/validate-kubescape-frameworks/main.go [1173:2 - 1183:13] (11 lines, 53 tokens)
   scripts/validate-kubescape-frameworks/main.go [1205:2 - 1215:13]
Clone found (go)
 - scripts/validate-matcher-efficacy/main.go [143:23 - 149:8] (7 lines, 52 tokens)
   scripts/validate-matcher-efficacy/main.go [160:25 - 166:9]
Clone found (go)
 - scripts/validate-matcher-efficacy/main.go [345:44 - 359:3] (15 lines, 78 tokens)
   scripts/validate-matcher-efficacy/main.go [373:59 - 387:3]
Clone found (go)
 - scripts/validate-matcher-efficacy/main_test.go [82:38 - 90:57] (9 lines, 62 tokens)
   scripts/validate-matcher-efficacy/main_test.go [117:45 - 125:57]
Clone found (go)
 - scripts/validate-matcher-efficacy/main_test.go [82:38 - 90:31] (9 lines, 55 tokens)
   scripts/validate-matcher-efficacy/main_test.go [133:41 - 141:31]
Clone found (python)
 - scripts/validate-naming.py [126:52 - 132:25] (7 lines, 53 tokens)
   scripts/validate-naming.py [171:82 - 177:29]
┌────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash   │ 84             │ 30809       │ 124407       │ 69           │ 819 (2.66%)      │ 6130 (4.93%)      │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ diff   │ 1              │ 147         │ 1071         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ go     │ 43             │ 38430       │ 220721       │ 126          │ 1038 (2.70%)     │ 9373 (4.25%)      │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python │ 4              │ 807         │ 5606         │ 2            │ 14 (1.73%)       │ 111 (1.98%)       │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ txt    │ 1              │ 267         │ 1541         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total: │ 133            │ 70460       │ 353346       │ 197          │ 1871 (2.66%)     │ 15614 (4.42%)     │
└────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 197 clones.
HTML report saved to megalinter-reports/copy-paste/jscpd-report.html
ERROR: jscpd found too many duplicates (2.7%) over threshold (0.0%)
time: 1.06s

(Truncated to last 8000 characters out of 36902)
⚠️ SPELL / lychee - 1 error
📝 Summary
---------------------
🔍 Total..........251
🔗 Unique.........161
✅ Successful.....221
⏳ Timeouts.........0
🔀 Redirected.......8
👻 Excluded........29
❓ Unknown..........0
🚫 Errors...........1
⛔ Unsupported......1

Errors in .github/workflows/publish-kubescape-storage-hotfix.yaml
[404] https://github.com/devantler-tech/platform/.github/workflows/publish-kubescape-storage-hotfix.yaml@refs/heads/main (at 166:37) | Rejected status code: 404 Not Found

Hint: Followed 8 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 65 errors
.claude/skills/maintain/SKILL.md:6 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Perform maintenance per the **..."]
AGENTS.md:15:401 error MD013/line-length Line length [Expected: 400; Actual: 838]
AGENTS.md:24 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
AGENTS.md:101:401 error MD013/line-length Line length [Expected: 400; Actual: 1784]
AGENTS.md:103:401 error MD013/line-length Line length [Expected: 400; Actual: 439]
AGENTS.md:105:401 error MD013/line-length Line length [Expected: 400; Actual: 1126]
AGENTS.md:106:401 error MD013/line-length Line length [Expected: 400; Actual: 628]
AGENTS.md:107:401 error MD013/line-length Line length [Expected: 400; Actual: 1774]
AGENTS.md:160:401 error MD013/line-length Line length [Expected: 400; Actual: 649]
AGENTS.md:162:401 error MD013/line-length Line length [Expected: 400; Actual: 971]
AGENTS.md:189:401 error MD013/line-length Line length [Expected: 400; Actual: 970]
AGENTS.md:193:401 error MD013/line-length Line length [Expected: 400; Actual: 660]
AGENTS.md:211:401 error MD013/line-length Line length [Expected: 400; Actual: 1510]
AGENTS.md:279:401 error MD013/line-length Line length [Expected: 400; Actual: 1016]
AGENTS.md:280:401 error MD013/line-length Line length [Expected: 400; Actual: 491]
AGENTS.md:281:401 error MD013/line-length Line length [Expected: 400; Actual: 468]
AGENTS.md:287:401 error MD013/line-length Line length [Expected: 400; Actual: 532]
AGENTS.md:289:401 error MD013/line-length Line length [Expected: 400; Actual: 523]
AGENTS.md:292:401 error MD013/line-length Line length [Expected: 400; Actual: 613]
AGENTS.md:293:401 error MD013/line-length Line length [Expected: 400; Actual: 714]
AGENTS.md:297:401 error MD013/line-length Line length [Expected: 400; Actual: 502]
AGENTS.md:301:401 error MD013/line-length Line length [Expected: 400; Actual: 441]
AGENTS.md:306:401 error MD013/line-length Line length [Expected: 400; Actual: 427]
AGENTS.md:409:401 error MD013/line-length Line length [Expected: 400; Actual: 1139]
AGENTS.md:411:401 error MD013/line-length Line length [Expected: 400; Actual: 1240]
AGENTS.md:427:401 error MD013/line-length Line length [Expected: 400; Actual: 1137]
AGENTS.md:824:401 error MD013/line-length Line length [Expected: 400; Actual: 790]
AGENTS.md:829:401 error MD013/line-length Line length [Expected: 400; Actual: 515]
CLAUDE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "@AGENTS.md"]
docs/dr/alerting.md:228:28 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/crypto-custody.md:22:389 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/crypto-custody.md:23:264 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/crypto-custody.md:27:35 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/crypto-custody.md:27:161 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/crypto-custody.md:27:239 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/crypto-custody.md:114 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Custody recommendations"]
docs/dr/crypto-custody.md:245 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Custody recommendations"]
docs/dr/crypto-custody.md:251 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "What to do if it leaks"]
docs/dr/crypto-custody.md:258 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "What to do if it is *lost* (no..."]
docs/dr/restore-drill.md:42 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/dr/runbook.md:23:102 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/runbook.md:23:487 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/runbook.md:34 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/dr/runbook.md:41 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/dr/runbook.md:50 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/dr/runbook.md:589:92 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/spire-server-ha.md:93 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/dr/velero-cnpg.md:11 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/dr/velero-cnpg.md:56:78 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/velero-cnpg.md:56:166 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/velero-cnpg.md:57:78 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/velero-cnpg.md:57:227 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/velero-cnpg.md:58:78 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/dr/velero-cnpg.md:58:166 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/github-management.md:38:401 error MD013/line-length Line length [Expected: 400; Actual: 419]
docs/github-management.md:40:401 error MD013/line-length Line length [Expected: 400; Actual: 522]
docs/node-autoscaling.md:14 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/oidc-kubectl.md:95 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/runtime-security.md:114 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/rwx-storage.md:9 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/unifi-management.md:14 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
docs/unifi-management.md:62 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
README.md:116:401 error MD013/line-length Line length [Expected: 400; Actual: 540]
README.md:237:32 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
README.md:237:36 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]

✅ Linters with no issues

actionlint, betterleaks, checkov, git_diff, grype, jsonlint, osv-scanner, prettier, prettier, revive, secretlint, shellcheck, shfmt, syft, trivy, trivy-sbom, trufflehog, v8r, v8r, yamllint, zizmor

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: REPOSITORY_GITLEAKS. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@devantler
devantler marked this pull request as ready for review August 29, 2026 08:14
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

Exact current head: ccf98018266f7ec1d1106a64f30581f33090b474; all hosted checks are terminal green. Please review the foreground-safe SQLite transaction scheduling and its executable regressions.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

@devantler I will review the foreground-safe SQLite transaction scheduling and its executable regressions at ccf98018266f7ec1d1106a64f30581f33090b474.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0e42b423-33cc-49f3-b1b2-27a307c7e088

📥 Commits

Reviewing files that changed from the base of the PR and between f0bb489 and ccf9801.

📒 Files selected for processing (3)
  • .github/workflows/publish-kubescape-storage-hotfix.yaml
  • k8s/bases/infrastructure/controllers/kubescape/storage-v0.0.297-sqlite-contention.patch
  • scripts/tests/test-kubescape-storage-hotfix.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🔇 Additional comments (3)
k8s/bases/infrastructure/controllers/kubescape/storage-v0.0.297-sqlite-contention.patch (1)

10-10: LGTM!

Also applies to: 22-22, 30-33, 118-118, 135-146

scripts/tests/test-kubescape-storage-hotfix.sh (1)

38-39: LGTM!

Also applies to: 94-94, 104-118

.github/workflows/publish-kubescape-storage-hotfix.yaml (1)

27-27: LGTM!


📝 Walkthrough

Walkthrough

The hotfix pins the container-profile maintenance worker count to one. It updates transaction tests to confirm that read-phase transactions do not reserve SQLite’s writer. The validation script now checks the .3 image tag, five patch files, and the updated storage coverage. The publish workflow also uses the .3 image tag.

Merge Risk: ⚪ Minimal · up to ccf98

The change limits background storage maintenance to one worker and keeps foreground writes schedulable; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Kubescape foreground storage scheduling fix, which matches the main changes.
Description check ✅ Passed The description explains the SQLite contention root cause, the transaction and worker changes, validation results, and image publication scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devantler
devantler added this pull request to the merge queue Aug 29, 2026
Merged via the queue into main with commit 04c5092 Aug 29, 2026
51 of 52 checks passed
@devantler
devantler deleted the codex/kubescape-storage-foreground-writes-3275 branch August 29, 2026 08:32
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant